import { Graph } from '@antv/x6'

import Count from '../components/Count.vue'

const graph = new Graph({
  container: document.getElementById("app"),
  width: 600,
  height: 400,
  grid: true,
});

Graph.registerNode("my-count", {
  inherit: "vue-shape",
  x: 200,
  y: 150,
  width: 150,
  height: 100,
  component: {
    template: `<Count />`,
    components: {
      Count,
    },
  },
});

graph.addNode({
  id: "1",
  shape: "my-count",
  x: 400,
  y: 150,
  width: 150,
  height: 100,
  data: {
    num: 0,
  },
});